#ifndef __ICS_COMMON_H__
#define __ICS_COMMON_H__


char *g_strdup(const char *in);
int g_directory_exist(const char *dirname);
int g_create_dir(const char *dirname);
int g_getpid(void);
int g_file_write(int fd, const char *ptr, int len);
int g_file_read(int fd, char *ptr, int len);
int g_file_close(int fd);
int redirect_fd(int fd, int flags);
int daemonize();
int g_sck_can_recv(int sck, int millis);
int g_file_exist(const char *filename);
int g_create_path(const char *path);
int g_file_open(const char *file_name);
int create_socket();
int bind_server(int sockfd, int port);
int listen_server(int sockfd);
int connect_server_handle(int port);
#endif